package qyx;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int T = sc.nextInt();                 // 只读一组
        for (int i = 0; i < T; i++) {
            long n = sc.nextLong();
            System.out.println(countSquareDivisors(n));
        }
        sc.close();
    }

    // 统计 n 的完全平方因子个数
    private static long countSquareDivisors(long n) {
        if (n == 1) return 1;
        long ans = 1, x = n;

        int e = 0;
        while ((x & 1L) == 0L) { x >>= 1; e++; }
        if (e > 0) ans *= (e / 2 + 1);

        for (long p = 3; p * p <= x; p += 2) {
            if (x % p == 0) {
                e = 0;
                while (x % p == 0) { x /= p; e++; }
                ans *= (e / 2 + 1);
            }
        }
        return ans; // 若 x>1，其指数为1，乘1不变
    }
}
